package urlBaseBusiness;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import impl.TestServerBusinessImpl;
import models.MyConfig;
import models.ReturnJson;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by yangxianming on 2023/03/15.
 * 获取用例数据
 *
 */
public class GetBaseurlInfo implements TestServerBusinessImpl {
    @Override
    public String doIt(HttpServletRequest request, MyConfig myConfig) {
        ReturnJson returnJson = new ReturnJson();
        JSONArray kfhg = new JSONArray();
        kfhg.add("UN:efuli PW:efuli@2019");
        kfhg.add("各种提交密码 efuli@2018");
        JSONArray core = new JSONArray();
        core.add("UN:admin PW:core@efuli");
        core.add("UN:admin PW:Core@2018");
        JSONArray corp = new JSONArray();
        corp.add("UN:fuyuanwai PW:Fyw@2018");
        corp.add("UN:puhuitong PW:888888");
        corp.add("UN:jujie PW:Jujie@2018");
        corp.add("UN:nvdi PW:Core@2018");
        corp.add("UN:bona PW:Bona@2018");
        JSONArray shop = new JSONArray();
        shop.add("UN:admin PW:admin");

        JSONObject jsonObject = new JSONObject();
        jsonObject.put("kfhg", kfhg);
        jsonObject.put("core", core);
        jsonObject.put("corp", corp);
        jsonObject.put("shop", shop);

        returnJson.setApiStatus(1);
        returnJson.setResult(jsonObject);
        return returnJson.toString();
    }
}
